<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <!-- The Basics -->
    <groupId>netdb</groupId>
    <artifactId>netdb-ask</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <packaging>war</packaging>

    <name>${gaeApplicationName}</name>

    <repositories>
        <repository>
            <id>objectify-appengine</id>
            <name>Objectify Maven Repository</name>
            <url>http://objectify-appengine.googlecode.com/svn/maven</url>
        </repository>
    </repositories>

    <dependencies>
        <!--
        jars from GAE's "lib/user" must be added as compile-time dependencies,
        as described here in "Copying JARs" section:
        http://code.google.com/appengine/docs/java/tools/ant.html
        -->


        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-1.0-sdk</artifactId>
            <version>1.6.5</version>
        </dependency>

        <!--
        J2EE Servlet API. We need it to compile IndexServlet class.
        You can probably remove it, if you don't explicitly use Servlets.
        -->
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-servlet_2.5_spec</artifactId>
            <version>1.2</version>
            <scope>provided</scope>
        </dependency>


        <!--
        Make use of JSP tags. Remove, if you don't use JSPs.
        -->

        <!--
        These dependencies are here just for enabling logging.
        -->


        <!-- Test scope -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <!--
        GAE libraries for local testing as described here:
        http://code.google.com/appengine/docs/java/howto/unittesting.html
        -->
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-labs</artifactId>
            <version>${gae.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-stubs</artifactId>
            <version>${gae.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-testing</artifactId>
            <version>${gae.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
        	<groupId>commons-logging</groupId>
        	<artifactId>commons-logging</artifactId>
        	<version>1.1.1</version>
        </dependency>
        <dependency>
        	<groupId>org.codehaus.jackson</groupId>
        	<artifactId>jackson-core-asl</artifactId>
        	<version>1.6.2</version>
        </dependency>
        <dependency>
        	<groupId>org.codehaus.jackson</groupId>
        	<artifactId>jackson-mapper-asl</artifactId>
        	<version>1.6.2</version>
        </dependency>
        <dependency>
        	<groupId>netdb.courses.softwarestudio</groupId>
        	<artifactId>netdb-smail</artifactId>
        	<version>1.0-SNAPSHOT</version>
        	<type>war</type>
        </dependency>
        <dependency>
        	<groupId>com.googlecode.objectify</groupId>
        	<artifactId>objectify</artifactId>
        	<version>2.2.3</version>
        </dependency>
        <dependency>
        	<groupId>javax.persistence</groupId>
        	<artifactId>persistence-api</artifactId>
        	<version>1.0</version>
        </dependency>
    </dependencies>

    <build>
        <extensions>
            <extension>
                <groupId>org.apache.maven.archetype</groupId>
                <artifactId>archetype-packaging</artifactId>
                <version>2.0-alpha-5</version>
            </extension>
        </extensions>

        <plugins>
            <plugin>
                <artifactId>maven-archetype-plugin</artifactId>
                <version>2.0-alpha-4</version>
                <extensions>true</extensions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1-beta-1</version>
                <configuration>
                	<useCache>false</useCache>
                    <webResources>
                        <resource>
                            <directory>src/main/webapp</directory>
                            <filtering>true</filtering>
                            <includes>
                                <include>**/appengine-web.xml</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>

            <!--
            The actual maven-gae-plugin. Type "mvn gae:run" to run project,
            "mvn gae:deploy" to upload to GAE.
            -->
            <plugin>
                <groupId>net.kindleit</groupId>
                <artifactId>maven-gae-plugin</artifactId>
				        <version>0.9.2</version>
            </plugin>

            <!--
            Upload application to the appspot automatically, during
            release:perform.
            -->
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <goals>gae:deploy</goals>
                </configuration>
            </plugin>

            <!--
            Java compiler version
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.0</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!--
    Specify hard-coded project properties here.
    -->
    <properties>

        <!-- Sets the project's default encoding.
         http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!--
        This is just for "eclipse:eclipse" goal to always attempt downloading
        sources.
        -->
        <downloadSources>true</downloadSources>

        <!--
        Specify AppEngine version for your project. It should match
        SDK version pointed to by ${gae.home} property (Typically, one used by your
        Eclipse plug-in).
        -->
        <gae.version>1.6.5</gae.version>

        <!--
        Upload to http://test.latest.<applicationName>.appspot.com by
        default.
        -->
        <gae.application.version>test</gae.application.version>
        <gae.maven.plugin.version>0.9.2</gae.maven.plugin.version>
        <gae.serverId>appengine.google.com</gae.serverId>
        <junit.version>4.8.2</junit.version>
    </properties>

    <profiles>
        <!--
        We can configure our integration server to activate this profile
        and perform gae:deploy, thus uploading latest snapshot to the
        http://1.latest.<applicationName>.appspot.com automatically.
        -->
        <profile>
            <id>integration-build</id>
            <properties>
                <gae.application.version>stage</gae.application.version>
            </properties>
        </profile>

        <!--
        This profile will activate automatically during release and
        upload application to the http://2.latest.<applicationName>.appspot.com (We
        might want to set the 2nd version as our applications Default version to
        be accessible at http://<applicationName>.appspot.com).
        -->
        <profile>
            <id>release-build</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>

            <properties>
                <!--
                During release, set application version in appengine-web.xml
                to 2.
                -->
                <gae.application.version>release</gae.application.version>
            </properties>
        </profile>
    </profiles>

</project>
